<script setup lang="ts">
import { defineProps, VNode } from "vue";
import { NTooltip } from "naive-ui";

interface IProps {
  tip?: string;
  trigger?: VNode;
}
const props = defineProps<IProps>();
</script>

<template>
  <NTooltip trigger="hover">
    <template #trigger>
      <props.triger v-if="props.trigger" />
      <slot v-else></slot>
    </template>
    {{ props.tip }}
  </NTooltip>
</template>

<style scoped></style>
